package com.example.mapper;

import com.example.entity.Collect;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author: 康伟奇
 * @date: 2023 - 11 - 23 16:58
 **/
public interface CollectMapper {

    @Select("select * from collect where user_id = #{userId} and business_id = #{businessId}")
    Collect selectByUserIdAndBusinessId(@Param("userId") Integer userId,@Param("businessId") Integer businessId);

    /**
     * 新增
     */
    int insert(Collect collect);

    /**
     * 删除
     */
    int deleteById(Integer id);

    /**
     * 修改
     */
    int updateById(Collect collect);

    /**
     * 根据ID查询
     */
    Collect selectById(Integer id);

    /**
     * 查询所有
     */
    List<Collect> selectAll(Collect collect);
}
